package 线程;

public class person extends Thread{
    static int i = 0;
    Object o = new Object();
    @Override
    public void run() {
        synchronized (o) {
            for (; i <= 100; i++) {
                System.out.println(Thread.currentThread().getName()+":"+i);
            }
        }
    }
}
